/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mamayukero.problem.environment;

public class Timer {
    private static int minute, hour;
    
    public static void initTimer() {
        minute = 0;
        hour = 0;
    }
    
    public static void setMinute(int m) {
        minute = m;
    }
    
    public static void setHour(int h) {
        hour = h;
    }
    
    public static int getMinute() {
        return minute;
    }
    
    public static int getHour() {
        return hour;
    }
    
    public static void incMinute() {
        if (minute == 59) {
            hour++;
            minute = 0;
        } else
            minute++;
    }
    
    private static String reformat(int d) {
        return ((d < 10)?"0"+d:Integer.toString(d));
    }
    
    public static void incHour() {
        hour++;
    }
    
    public static String whatTime() {
        int day = (hour/24)+1;
        int hou = (hour%24);
        return "DAY " + reformat(day) + "|" + reformat(hou) + ":" + reformat(minute);
    }
}
